package com.vhall.component.controller.preparation;

import com.vhall.component.controller.preparation.facade.ScrollingConsoleFacade;
import com.vhall.component.entity.preparation.vo.ScrollingGetVO;
import com.vhall.component.entity.preparation.vo.ScrollingSaveVO;
import com.vhall.component.entity.preparation.vo.ScrollingVO;
import com.vhall.component.framework.common.annotation.VhallComponent;
import com.vhall.component.plugin.common.annotation.TokenAuth;
import com.vhall.component.service.preparation.ScrollingConsoleService;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;

/**
 * @author rui.zhou
 * @date 2021/5/16 10:11
 */

@VhallComponent
@TokenAuth
public class ScrollingConsoleController implements ScrollingConsoleFacade {

    @Resource
    private ScrollingConsoleService scrollingConsoleService;

    @Override
    public ScrollingVO saveScroll(@Validated ScrollingSaveVO reqVO) {
        return scrollingConsoleService.save(reqVO);
    }

    @Override
    public ScrollingVO info(@Validated ScrollingGetVO reqVO) {
        return scrollingConsoleService.info(reqVO.getRoomId());
    }
}
